package com.bpr.webservice.repository;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import com.bpr.webservice.domain.Menu;

public interface MenuRepository extends JpaRepository<Menu, Long> {

	@Query("select m from Menu m where link = :linkUrl")
	public Menu getMenuByLink(@Param("linkUrl") String linkUrl);
	
	@Query("select m from Menu m where menuname like :menuname")
	public Page<Menu> findMenuByMenuName(@Param("menuname") String menuname, Pageable page);
	
}
